<!DOCTYPE html>
<html>
<head>
    <title>用户</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("sys:users:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("sys:users:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("sys:users:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
														                    <div class="form-group">
                        <div class="col-sm-2 control-label">真实姓名</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.realname" placeholder="真实姓名"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">用户名</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.username" placeholder="用户名"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">手机号</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.telphone" placeholder="手机号"/>
                        </div>
                    </div>
											                    <!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">头像</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input type="text" class="form-control" v-model="users.headimg" placeholder="头像"/>-->
                        <!--</div>-->
                    <!--</div>-->

            <!--<div class="form-group" id="t1">-->
                <!--<div class="col-sm-2 control-label">头像</div>-->
                <!--<div class="col-sm-10">-->
                    <!--<input type="text" class="form-control" v-model="users.headimg" id="headimg" placeholder="头像"-->
                           <!--readonly="readonly"/>-->
                    <!--<button type="button" class="layui-btn  layui-btn-sm" id="xzHeadimg">-->
                        <!--选择图片-->
                    <!--</button>-->
                    <!--<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="isHeadimg">-->
                        <!--上传-->
                    <!--</button>-->
                    <!--<div id="xsHeadimg"></div>-->
                <!--</div>-->
            <!--</div>-->

											                    <div class="form-group">
                        <div class="col-sm-2 control-label">性别</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.gender" placeholder="性别"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">openid</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.openid" placeholder="openid"/>
                        </div>
                    </div>
											                    <!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">创建时间</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input type="text" class="form-control" v-model="users.createtime" placeholder="创建时间"/>-->
                        <!--</div>-->
                    <!--</div>-->
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">最后使用时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control"  id="lastlogintime" v-model="users.lastlogintime" placeholder="最后使用时间"/>
                        </div>
                    </div>
											                    <!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">角色 0 学生 1 老师</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input type="text" class="form-control" v-model="users.role" placeholder="角色 0 学生 1 老师"/>-->
                        <!--</div>-->
                    <!--</div>-->
                    <div class="form-group">
                        <div class="col-sm-2 control-label">角色</div>
                        <div class="col-sm-10">
                            <select class="form-control" v-model="users.role" @keyup.enter="query" >
                                <option value="0">学生</option>
                                <option value="1">老师</option>
                            </select>
                        </div>
                    </div>
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/users.js?_${.now?long}"></script>
<script>
    var startDate= laydate.render({
        elem: '#lastlogintime'//指定元素
        ,type: 'datetime'
    });
</script>
</body>
</html>